package day20171103;

import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;

public class TestMapSet {
    public static void main(String[] args) {
        Map<Long,String> map = new HashMap<Long,String>();  //键，值
        map.put(1001L,"张三");
        map.put(1002L,"李四");
        map.put(1003L,"王五");

        for(Map.Entry<Long,String> entry : map.entrySet()) {
            System.out.println(entry.getKey() + " : " + entry.getValue());
        }

        System.out.println(map.entrySet());

        Set<Integer> set = new HashSet<Integer>();    //建立set集合

    }
}